import request from '@/utils/request';
import store from '@/store'

export function addData(data) {
  const params = {
    ...data,
    createUserId: store.getters.userId,
    updateUserId: store.getters.userId
  }
  return request({
    url: '/maintain/maintain/mDocument/add',
    method: 'put',
    data: params
  })
}
export function deleteData(data) {
  return request({
    url: '/maintain/maintain/mDocument/delete/' + data,
    method: 'delete'
  })
}

export function sumbitData(data) {
  const params = {
    ...data,
    createUserId: store.getters.userId,
    updateUserId: store.getters.userId
  }
  return request({
    url: '/maintain//maintain/mDocument/submit',
    method: 'put',
    data: params
  })
}
// 科研产品审核的接口
export function toExamine(data) {
  const params = {
    ...data,
  }
  return request({
    url: '/maintain/maintain/approve/toExamine',
    method: 'post',
    data: params
  })
}